package cn.itcast.beanfactory.servlet;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;

import cn.itcast.beanfactory.BeanFactory;
import cn.itcast.beanfactory.web.utils.IocUtils;

public class BeanFactoryServlet extends HttpServlet {
    public void init() throws ServletException {
        String beanFactoryConfig = this.getInitParameter("beanFactoryConfig");
        BeanFactory factory = new BeanFactory(beanFactoryConfig);
        IocUtils.add(this.getServletContext(), factory);
    }
}
